<?php 
class CommentController extends  AuthController{
	private $model;
	/**
	 * 初始化
	 */
	 public function __init(){
	 	parent::__init();
		//K就是调用扩展模型Common/Model文件夹里面
		$this->model=K('Comment');
	 }
	 
	 public function index(){
	 	$data=$this->model->all();
		$this->assign('data',$data);
	 	$this->display();
	 }
	 public function del(){
	 	$coid=Q("get.coid",0,"intval");
//		p($coid);
		$this->model->where("coid={$coid}")->delete();
		$this->success('删除成功');
	 }
	 
}




 ?>